package com.example.demo69.dao;

import com.example.demo69.entity.User;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface UserDao {

    @Select("select * from users limit #{start} , #{limit}")
    List<User> queryUserList(@Param("start") int start , @Param("limit") int limit);

    @Insert("insert into users (user_name,password) values (#{userName}, #{password})")
    void insert(User user);

    @Update("")
    void update(User user);

    @Delete("delete from users where id = #{id}")
    void delete(int id);
}

